<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  <tiles:insertTemplate template="/tiles/classic.jsp">
    <tiles:putAttribute name="body">
    <h1>
        Welcome TwitFreaks!
    </h1>
    <h2>

       <c:choose>
           <c:when test="${pageContext.request.userPrincipal == null}">

               <a href="${loginLink}">Sign in</a>
           </c:when>
           <c:otherwise>
               <a href="${logoutLink}">Sign out</a>
           </c:otherwise>
       </c:choose>
    </h2>
      </tiles:putAttribute>
</tiles:insertTemplate>